package com.oauth.server.extend.service;

import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * @作者: 林江
 * @创建时间: 2024/1/13
 * @功能:
 */
@Service
public class DefaultUserDetailsService implements UserDetailsService {

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        System.out.println("进行验证。。。。。。。。。。。。");
        return User.builder().username("admin").password("{noop}admin").authorities("role_admin").build();
    }

}
